function [RLTRound_FinalResult] = RLTRound_CL_sub2(a_pairing_relax,B,num_u,num_h,H_wu,H_wh,H_uh,eff,P_w,bit_to_cycle,cpu,Data)
% 包含子函数：RLTRound_finalsub_CL
 a_collect = zeros(num_u,num_h+1);
 for n = 1:num_u
     for mm = 2:(num_h+1)
         a_collect(n,mm) = a_pairing_relax(n,mm-1);
     end
     a_collect(n,1) = 1 - sum(a_collect(n,2:end)); % 松弛的本地决策
 end
 %% 取整的决策解
 a_collect_copy = zeros(num_u,num_u+num_h); % 逐n复制本地的松弛决策
 for n = 1:num_u
     for m_1 = 1:num_u
         a_collect_copy(n,m_1) = a_collect(n,1);
     end
     for m_2 = (num_u+1):(num_u+num_h)
         a_collect_copy(n,m_2) = a_collect(n,m_2-num_u+1);
     end
 end
a_collect_int = zeros(num_u,num_u+num_h);
 while sum(sum(a_collect_int)) ~= num_u
     [index_x,index_y] = find( a_collect_copy(:,:) == max(max(a_collect_copy(:,:))));
     if length(index_x) > 1
         index_x = index_x(1);
         index_y = index_y(1);
     end
     a_collect_int(index_x,index_y) = 1;
     for n = 1:num_u
         a_collect_copy(n,index_y) = 0;
     end
     for m = 1:(num_u+num_h)
         a_collect_copy(index_x,m) = 0;
     end
 end
% 解码a_collect_int
a_local_final = zeros(1,num_u);
a_pair_final = zeros(num_u,num_h);
for n = 1:num_u
    a_local_final(n) = sum(a_collect_int(n,1:num_u));
    for m = 1:num_h
        a_pair_final(n,m) = a_collect_int(n,m+num_u);
    end
end
%% 已得到决策，求解其他变量得次优解
[RLTRound_FinalResult] = RLTRound_finalsub_CL(a_local_final,a_pair_final,B,num_u,num_h,H_wu,H_wh,H_uh,eff,P_w,bit_to_cycle,cpu,Data);

end